<?php
require "/var/www/html/collection/libs/constellation.class.php";

class constellationFormat {

private $constellation;
function __construct(){
	$this->constellation = new constellation();
}

public function collectConstellation($constellation){//根据星座搜集该星座5个时间的数据   并格式化并返回json数组
	

	$today = $this->constellation->getToday($constellation);
	$constellationArr["today"] = addslashes(serialize($today));
	// var_dump($constellationArr["today"] );

	$week = $this->constellation->getWeekly($constellation);
	$constellationArr["weekly"] = addslashes(serialize($week));
	// var_dump($constellationArr["week "]);
	
	$month = $this->constellation->getMonthly($constellation);
	$constellationArr["month"] = addslashes(serialize($month));
	// var_dump($constellationArr["month "] );

	$year = $this->constellation->getYear($constellation);
	$constellationArr["year"] = addslashes(serialize($year));
	// var_dump($constellationArr["year "]);

	$yearlove = $this->constellation->getYear_love($constellation);
	$constellationArr["year_love"] = addslashes(serialize($yearlove));
	// var_dump($constellationArr["yearlove "]);


	return $constellationArr;
}

public function collectIndexHD(){
	$hd = $this->constellation->getHD();
	$hd = addslashes(serialize($hd));
	return $hd;
}	


}

?>